#pragma once
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include "headers.h"
#include "codeeditor.h"

namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private:
    Ui::MainWindow *ui;

    QLabel* statusText;

    CodeEditor* _editor;
    QString _fileName;
    QString _filePath;
    bool _modified;
    bool SaveModified();

    bool autoSave;
    bool showInfo;
    InfoWnd* infoWnd;
    Parser* parser;

private slots:
    void SetTitle();
    void NewFile();
    void OpenFile();
    bool SaveFile();
    bool SaveAsFile();
    void Build();
    void Exit();
    void ShowInfoChanged();
};

#endif
